package demo3;

public class Test {
    public static void main(String[] args) throws CloneNotSupportedException{//第二步：声明异常
        Person person1=new Person("zz",2,90.9);
        Person person2=(Person) person1.clone();//第三步：向下转形
        System.out.println(person1.money.money);
        System.out.println(person2.money.money);
        System.out.println("==============");
        person2.money.money=19.9;
        System.out.println(person1.money.money);
        System.out.println(person2.money.money);
        //上述的叫浅拷贝


    }
}
